import React, { useState } from 'react';
import './SearchMode.css'; // 引入样式

const SearchMode = ({ onModeChange }) => {
  const handleChange = (e) => {
    onModeChange(e.target.value); // 通过下拉框选择检索方式
  };

  return (
    <div className="search-mode-container">
      <label htmlFor="searchMode"></label>
      <select
        id="searchMode"
        className="search-mode-select"
        onChange={handleChange}
      >
        <option value="keyword">关键词检索</option>
        <option value="semantic">语义检索</option>
        <option value="hybird">混合检索</option>
      </select>
    </div>
  );
};

export default SearchMode;